﻿namespace DAL.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class ModifyEmployeeAddDepartmentName : DbMigration
    {
        public override void Up()
        {
            AddColumn("dbo.employee", "DepartmentName", c => c.String(maxLength: 200));
            Sql("update employee set DepartmentName = Unit.UnitName from employee join Unit on Unit.UnitId = employee.DepartmentId");
        }
        
        public override void Down()
        {
            DropColumn("dbo.employee", "DepartmentName");
        }
    }
}
